home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Views
/
Canvas Loops
/
CanvasColumnLoop.h
< prev
next >
Wrap
Text File
|
2000-06-23
|
1KB
|
41 lines
// CanvasColumnLoop.h
#ifndef CanvasColumnLoop_h
#define CanvasColumnLoop_h
#ifndef CanvasMaintainer_h
#include "CanvasMaintainer.h"
#endif
#ifndef Canvas_h
#include "Canvas.h"
#endif
/*
This object can't screen out invisible columns, because it doesn't
know the column heights, and because you may want to do some work
on invisible columns, like keeping other variables in sync.
*/
class CanvasColumnLoop
{
private:
const Canvas& parent;
Range32 column;
Canvas canvas;
CanvasMaintainer canvasMaintainer;
public:
CanvasColumnLoop( const Canvas&, Range32 firstColumn );
bool Finished() const { return column.Start() >= parent.OffScreen().right; }
bool Unfinished() const { return column.Start() < parent.OffScreen().right; }
void NextColumn( uint32 width );
void Remainder() { NextColumn( maxint32 - column.End() ); }
const Canvas *operator->() const { return &canvas; }
const Canvas& operator*() const { return canvas; }
};
#endif